home *** CD-ROM | disk | FTP | other *** search
/ Leisure Game Pak 1 / Leisure Game Pak I.iso / bin / whichmod.pas < prev   
Pascal/Delphi Source File  |  1994-08-17  |  616b  |  29 lines

  1. {Findfrst.PAS}
  2.  
  3. {Sample code for the FindFirst and FindNext procedures.}
  4.  
  5. { For Windows: }
  6. { uses WinDos,WinCrt; }
  7.  
  8. uses Dos,eco_env;
  9.  
  10. var
  11.  DirInfo: SearchRec;         { For Windows, use TSearchRec }
  12.   e      :  envrec;
  13.   ss     :  string;
  14.   vs     :  string;
  15.   status ,i : integer;
  16.  
  17. begin                          { For Windows, use faArchive }
  18.  randomize;
  19.  masterenv(e);
  20.  FindFirst('\mod\*.mod', Archive, DirInfo);
  21.  setenvstr(e, 'Mod', dirinfo.name) ;
  22.  i:=random(500);
  23.  for i:=i to 500
  24.  do begin
  25.    ss:=dirInfo.Name;   setenvstr(e, 'Mod', '\MOD\'+ss) ;
  26.    FindNext(DirInfo);
  27.  end;
  28. end.
  29.